แบบจำลองทางคณิตศาสตร์ของเพนดูลัมผกผัน[2][3] ของ เพนดูลัมผกผัน

ในที่นี้เราจะหาแบบจำลองทางคณิตศาสตร์ของเพนดูลัมผกผันโดยใช้กลศาสตร์แบบลากรางจ์ (Lagrange's equations) และตั้งสมุมติฐานเพื่อความง่ายต่อความเข้าใจและยังคงไม่สูญเสียความเป็นรูปแบบทั่วไปว่าระบบเคลื่อนที่อยู่ในระนาบ 2 มิติ แกน x − y {\displaystyle x-y} ได้เท่านั้น โดยตัวแปรต่างๆเราจะอ้างอิงตัวแปรเดียวกับที่ปรากฏในภาพ กล่าวคือ θ ( t ) {\displaystyle \theta (t)} คือ มุมที่แท่งเพนดูลัมทำกับแนวตั้งฉากกับพื้นโลก และให้แท่งเพนดูลัมมีความยาว l {\displaystyle l} ให้แรงจากภายนอกเป็น F {\displaystyle F} กระทำในทิศ x {\displaystyle x} ดังภาพ และแรงโน้มถ่วงของโลกกระทำในแนวแกน y {\displaystyle y} และกำหนดให้ x ( t ) {\displaystyle x(t)} เป็นระยะของรถในแกน x {\displaystyle x} ที่แปรผันตามเวลา และสมการลากรางจ์ (Lagrangian) ของระบบเป็นดังต่อไปนี้[4] L = T − V {\displaystyle L=T-V} โดย T {\displaystyle T} คือพลังงานจลน์ของระบบ และ V {\displaystyle V} คือพลังงานศักย์ของระบบ

รูปภาพแสดงรูปแบบของเพนดุลัมผกผันและตัวแปรที่ใช้ในการสร้างแบบจำลองทางคณิตศาสตร์

L = 1 2 M v 1 2 + 1 2 m v 2 2 − m g ℓ cos ⁡ θ {\displaystyle L={\frac {1}{2}}Mv_{1}^{2}+{\frac {1}{2}}mv_{2}^{2}-mg\ell \cos \theta }
โดย v 1 {\displaystyle v_{1}} เป็นความเร็วของของตัวรถ v 2 {\displaystyle v_{2}} เป็นความเร็วของจุดศูนย์กลางมวล m {\displaystyle m} ของมวลบนแท่งเพนดูลัม.
ทั้งนี้ v 1 {\displaystyle v_{1}} และ v 2 {\displaystyle v_{2}} สามารถเขียนให้อยู่ในรูปของ x {\displaystyle x} และ θ {\displaystyle \theta } ดังต่อไปนี้

v 1 2 = x ˙ 2 {\displaystyle v_{1}^{2}={\dot {x}}^{2}} v 2 2 = ( d d t ( x − ℓ sin ⁡ θ ) ) 2 + ( d d t ( ℓ cos ⁡ θ ) ) 2 {\displaystyle v_{2}^{2}=\left({\frac {d}{dt}}{\left(x-\ell \sin \theta \right)}\right)^{2}+\left({\frac {d}{dt}}{\left(\ell \cos \theta \right)}\right)^{2}}

ทำการลดรูป v 2 {\displaystyle v_{2}} ได้ผลเป็น

v 2 2 = x ˙ 2 − 2 ℓ x ˙ θ ˙ cos ⁡ θ + ℓ 2 θ ˙ 2 {\displaystyle v_{2}^{2}={\dot {x}}^{2}-2\ell {\dot {x}}{\dot {\theta }}\cos \theta +\ell ^{2}{\dot {\theta }}^{2}}

แทนสมการข้างต้นลงในสมการลากรางจ์ ได้ว่า:

L = 1 2 ( M + m ) x ˙ 2 − m ℓ x ˙ θ ˙ cos ⁡ θ + 1 2 m ℓ 2 θ ˙ 2 − m g ℓ cos ⁡ θ {\displaystyle L={\frac {1}{2}}\left(M+m\right){\dot {x}}^{2}-m\ell {\dot {x}}{\dot {\theta }}\cos \theta +{\frac {1}{2}}m\ell ^{2}{\dot {\theta }}^{2}-mg\ell \cos \theta }

และสมการการเคลื่อนที่:

d d t ∂ L ∂ x ˙ − ∂ L ∂ x = F {\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}{\partial {L} \over \partial {\dot {x}}}-{\partial {L} \over \partial x}=F} d d t ∂ L ∂ θ ˙ − ∂ L ∂ θ = 0 {\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}{\partial {L} \over \partial {\dot {\theta }}}-{\partial {L} \over \partial \theta }=0}

แทนที่ L {\displaystyle L} ในสมการข้างต้นจะได้สมการที่อธิบายการเลือนที่ของเพนดูลัมแบบผกผันดังนี้

( M + m ) x ¨ − m ℓ θ ¨ cos ⁡ θ + m ℓ θ ˙ 2 sin ⁡ θ = F {\displaystyle \left(M+m\right){\ddot {x}}-m\ell {\ddot {\theta }}\cos \theta +m\ell {\dot {\theta }}^{2}\sin \theta =F} ℓ θ ¨ − g sin ⁡ θ = x ¨ cos ⁡ θ {\displaystyle \ell {\ddot {\theta }}-g\sin \theta ={\ddot {x}}\cos \theta }

จะเห็นได้ว่าสมการที่ได้เป็นสมการไม่เชิงเส้นซึ่งยากที่จะนำไปออกแบบตัวควบคุม ในทางปฏิบัติผู้ออกแบบจะนิยมแปรงสมการไม่เชิงเส้นให้เป็นสมการเชิงเส้นก่อน โดยสมมุติว่าแท่งเพนดุลัมแกว่งอยู่ในช่วงมุมเล็กๆซึ่งประมาณเป็น 0 {\displaystyle 0} ได้ ( θ ≈ 0 {\displaystyle \theta \approx 0} ) ทั้งนี้เพื่อความง่ายต่อการออกแบบตัวควบคุม และง่ายต่อการอธิบายพฤติกรรมของระบบ